<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
	<title>v-show</title>
	<script src="vue.js" type="text/javascript"></script>
</head>
<body>
	<div id="app">
		<input type="button" name="" id="" value="切换显示状态" @click="changeIsShow" />
		<input type="button" name="" id="" value="增加年龄" @click="addAge" />
		<input type="button" name="" id="" value="减少年龄" @click="subAge" />
		<span>{{ age }}</span>
		<img v-show="isShow" src="img/01.png" alt="">
		<img v-show="age>20" src="img/01.png" alt="">
	</div>
<script>
	var app=new Vue({
		el:"#app",
		data:{
			isShow:false,
			age:17
		},
		methods: {
			changeIsShow:function() {
				this.isShow=!this.isShow;
			},
			addAge:function(){
				this.age++;
			},
			subAge:function(){
				this.age--;
			}
		},
	})
</script>

</body>
</html>
